<template>
<span class="vp-tag">2.4.2</span>
<p>当您的 <code>options</code> 格式不同于默认格式 您可以通过 <code>props</code> 属性自定义 <code>options</code></p>
  <el-select-v2
    v-model="value"
    :options="options"
    :props="props"
    placeholder="Please select"
    style="width: 240px"
    filterable
    multiple
  />
</template>

<script lang="ts" setup>
import { ref } from 'vue'
const initials = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
const props = {
  label: 'name',
  value: 'id',
}
const value = ref([])
const options = Array.from({ length: 1000 }).map((_, idx) => ({
  id: `Option ${idx + 1}`,
  name: `${initials[idx % 10]}${idx}`,
}))
</script>

<style scoped>
@import '../../assets/elementPlusDemo.css'
</style>